package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SalaryMapper;
import com.ruoyi.system.domain.Salary;
import com.ruoyi.system.service.ISalaryService;
import com.ruoyi.common.core.text.Convert;

/**
 * 员工工资Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-02-26
 */
@Service
public class SalaryServiceImpl implements ISalaryService 
{
    @Autowired
    private SalaryMapper salaryMapper;

    /**
     * 查询员工工资
     * 
     * @param id 员工工资ID
     * @return 员工工资
     */
    @Override
    public Salary selectSalaryById(Long id)
    {
        return salaryMapper.selectSalaryById(id);
    }

    /**
     * 查询员工工资列表
     * 
     * @param salary 员工工资
     * @return 员工工资
     */
    @Override
    public List<Salary> selectSalaryList(Salary salary)
    {
        return salaryMapper.selectSalaryList(salary);
    }

    @Override
    public List<Salary> selectMySalaryList(Salary mySalary) {
        return salaryMapper.selectMySalary(mySalary);
    }

    /**
     * 新增员工工资
     * 
     * @param salary 员工工资
     * @return 结果
     */
    @Override
    public int insertSalary(Salary salary)
    {
        return salaryMapper.insertSalary(salary);
    }

    /**
     * 修改员工工资
     * 
     * @param salary 员工工资
     * @return 结果
     */
    @Override
    public int updateSalary(Salary salary)
    {
        return salaryMapper.updateSalary(salary);
    }

    /**
     * 删除员工工资对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteSalaryByIds(String ids)
    {
        return salaryMapper.deleteSalaryByIds(Convert.toStrArray(ids));
    }

    @Override
    public List<Salary> selectSalaryByIds(String ids) {

        return salaryMapper.selectSalaryByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除员工工资信息
     * 
     * @param id 员工工资ID
     * @return 结果
     */
    @Override
    public int deleteSalaryById(Long id)
    {
        return salaryMapper.deleteSalaryById(id);
    }
}
